const crypto = require("crypto");
par = {
  ts: 1750909913680,
  pageNo: 2,
  pageSize: 20,
  total: 2572,
  AREACODE: "",
  M_PROJECT_TYPE: "",
  KIND: "GCJS",
  GGTYPE: "1",
  PROTYPE: "",
  timeType: "6",
  BeginTime: "2024-12-26 00:00:00",
  EndTime: "2025-06-26 23:59:59",
  createTime: "",
};
function s(e) {
  return crypto.createHash("md5").update(e).digest("hex");
}
function l(t, e) {
  return t.toString().toUpperCase() > e.toString().toUpperCase()
    ? 1
    : t.toString().toUpperCase() == e.toString().toUpperCase()
    ? 0
    : -1;
}
function u(t) {
  for (var e = Object.keys(t).sort(l), n = "", a = 0; a < e.length; a++)
    if (void 0 !== t[e[a]])
      if ((t[e[a]] && t[e[a]] instanceof Object) || t[e[a]] instanceof Array) {
        var i = JSON.stringify(t[e[a]]);
        n += e[a] + i;
      } else n += e[a] + t[e[a]];
  return n;
}
function d(t) {
  // 1. 清理空值参数
  for (var e in t) ("" !== t[e] && void 0 !== t[e]) || delete t[e];

  // 2. 生成参数字符串：固定密钥 + 排序后的参数字符串
  var n = "B3978D054A72A7002063637CCDF6B2E5" + u(t);

  // 3. 对拼接后的字符串进行哈希运算并转小写
  return s(n).toLocaleLowerCase();
}
console.log(d(par));
